Skip to content

Don't increase scrollable size for zero width tables#3283

Merged
iloveeclipse merged 1 commit intoeclipse-platform:masterfrom
iloveeclipse:stack_overflow_on_table_layout
Sep 18, 2025
Merged

Don't increase scrollable size for zero width tables#3283
iloveeclipse merged 1 commit intoeclipse-platform:masterfrom
iloveeclipse:stack_overflow_on_table_layout

Conversation

@iloveeclipse
Copy link
Copy Markdown
Member

This seem to fix StackOverflow on "Trust" table on Linux, see eclipse-equinox/p2#946.

No idea how and if this affect everything else.

Comment on lines 256 to +257
if (width > 1)
layoutTableTree(table, width, area, tableWidth < area.width);
layoutTableTree(table, width, area, tableWidth > 0 && tableWidth < area.width);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (width > 1)
layoutTableTree(table, width, area, tableWidth < area.width);
layoutTableTree(table, width, area, tableWidth > 0 && tableWidth < area.width);
if (width > 1 && tableWidth > 0)
layoutTableTree(table, width, area, tableWidth < area.width);

This seems more logical to me, we already check if the areas width is larger than 1 (why not zero? anyways ...) so it seems to already want to skip under this condition, having the table has no size at all seems a valid extension of such checks.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming we merge this one and it will introduce regressions, would you then agree to merge eclipse-equinox/p2#947 instead?
I honestly don't have more time to spend on debugging the "Trust" preference page.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can relate to not having time, so I empathize. I wold much prefer to see this cycle broken in this part of the code.

@laeubi

You made a suggestion but I don't really understand it.

Is the indentation off on the new line 256?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems more logical to me,

I haven't noticed that you have proposed different change. No, your proposal will not work, layoutTableTree() call is really needed. My proposal avoids some handling inside that method.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed it in my workspace and it looks fine to me. Please proceed. (And thank you!).

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Sep 17, 2025

Test Results

 2 904 files  ±0   2 904 suites  ±0   2h 17m 48s ⏱️ -10s
 8 017 tests ±0   7 772 ✅ +1  245 💤 ±0  0 ❌  - 1 
23 585 runs  ±0  22 803 ✅ +1  782 💤 ±0  0 ❌  - 1 

Results for commit c99cbab. ± Comparison against base commit ccd8bab.

♻️ This comment has been updated with latest results.

Comment on lines 256 to +257
if (width > 1)
layoutTableTree(table, width, area, tableWidth < area.width);
layoutTableTree(table, width, area, tableWidth > 0 && tableWidth < area.width);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed it in my workspace and it looks fine to me. Please proceed. (And thank you!).

@iloveeclipse iloveeclipse marked this pull request as ready for review September 18, 2025 15:10
This seem to fix StackOverflow on "Trust" table on Linux, see
eclipse-equinox/p2#946.

No idea how and if this affect everything else.
@iloveeclipse iloveeclipse force-pushed the stack_overflow_on_table_layout branch from fbe80a2 to c99cbab Compare September 18, 2025 15:10
@iloveeclipse iloveeclipse merged commit 8e2c4c2 into eclipse-platform:master Sep 18, 2025
18 checks passed
@iloveeclipse iloveeclipse deleted the stack_overflow_on_table_layout branch September 18, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants